"use client";
import { useRouter } from "next/navigation";

type Props = {
  articleId: number;
};

export default function GotoDedail({ articleId }: Props) {
  const router = useRouter();
  function gotoDetail() {
    router.push(`/browse/${articleId}`);
  }

  return (
    <div
      className="absolute top-0 left-0 w-full h-full cursor-pointer"
      onClick={gotoDetail}
    ></div>
  );
}
